{% comment %}
# Copyright 2009-2010 by Ka-Ping Yee
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
{% endcomment %}

<title>Resource Finder ({{subdomain}})</title>
<style>
body, h1, p, th, td { font-family: helvetica, arial; font-size: 13px; }
tr { vertical-align: baseline; }
th, td { text-align: left; padding: 2px 12px 2px 0; }
td.date { color: #888; }
input { margin: 0; }
</style>
<h1>PubSubHubbub Subscriptions ({{subdomain}})</h1>

<button onclick="window.location.reload()">Refresh</button>

<p>
<table cellpadding=0 cellspacing=0>
  <tr>
    <th>Date</th>
    <th>Topic URL</th>
  </tr>
  {% for sub in subscriptions %}
    <form method="post">
      <tr>
        <td class="date">
          {{sub.created|date:"Y-m-d"}}
        </td>
        <td>
          {{sub.topic|escape}}
        </td>
        <td>
          <input type="hidden" name="topic" value="{{sub.topic|escape}}">
          <input type="hidden" name="mode" value="unsubscribe">
          <input type="submit" value="Unsubscribe">
        </td>
      </tr>
    </form>
  {% endfor %}
  <form method="post">
    <tr>
      <td class="date">
        {% now "Y-m-d" %}
      </td>
      <td>
        <input name="topic" size=60>
      </td>
      <td>
        <input type="hidden" name="mode" value="subscribe">
        <input type="submit" value="Subscribe">
      </td>
    </tr>
  </form>
</table>
